home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 3: CDPD 3
/
Almathera Ten on Ten - Disc 3: CDPD3.iso
/
scope
/
001-025
/
scopedisk6
/
enough
/
enough.man
< prev
next >
Wrap
Text File
|
1995-03-18
|
2KB
|
58 lines
Enough AMIGA PROGRAMMER'S MANUAL Enough
NAME
Enough - test for the availibility of ram.
SYNOPSIS
Enough TOTAL [CHIP]
DESCRIPTION
This short command makes launching applications via batch files a
little safer. We all know that the Amiga should be able to handle a
situation where your memory is running low and you try to start an
application that requires more ram than you have free, or more chip ram
than you have free. A well written program will let you know of the
situation, if possible, and exit properly. If there isn't even enough
ram free to load the program, AmigaDOS should safely exit with the
ever-so-intelligible "not an object module."
We also all know that this doesn't always happen, or that the low memory
situation will cause problems elsewhere in the system. The Amiga simply
doesn't like to be low on memory.
Enough's uses include those "setup" types of files, where you
rez -l make cc ln as
or
run preview
run mg
tex -R
or the ever popular AmiCron, where you could run MRBackup every Monday
afternoon at 3:00, provided there's enough ram.
EXAMPLE
Enough 200000 100000
will test for the existance of 200000 bytes of ram, 100000 of which
must be chip ram. If there is enough, enough will exit with a return
code of 0; if there isn't, it will exit with a return code of 10.
Very simple. If you look at the source code, you'll see just how
simple.
Two very simple examples are provided. Launch is an execute script,
and launch.sh is a script for Matt Dillon's shell.
AUTHOR
Eric Kennedy ejkst@cisunix.edu
BUGS
How could anything so short have bugs?
Enough simply compares your requested amount with the amount in the
system, so it is up to you to provide your own safety margins.
Experiment first, using pm or shell or mclk, or some other utility that
provides seperate reports for fast, chip, and total. Run your system
down do what you think the minimum is and see if there's a problem
running your application.